package com.edu.springboot.service.impl;

import com.edu.springboot.domain.Student;
import com.edu.springboot.mapper.StudentMapper;
import com.edu.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceIpml implements StudentService {
    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Student> select() {
        return this.studentMapper.select();
    }

    @Override
    public Student selectById(Integer stid) {
        return this.studentMapper.selectById(stid);
    }

    @Override
    public void deleteById(Integer stid) {
        this.studentMapper.deleteById(stid);
    }

    @Override
    public void insert(Student student) {
        this.studentMapper.insert(student);
    }

    @Override
    public void updateById(Student student) {
        this.studentMapper.updateById(student);
    }
}
